import Vue from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'
import 'weui/dist/style/weui.min.css'
// import 'vue-ydui/dist/ydui.base.css'
import YDUI from 'vue-ydui'; /* 相当于import YDUI from 'vue-ydui/ydui.rem.js' */
import 'vue-ydui/dist/ydui.rem.css'; /* 使用px：import 'vue-ydui/dist/ydui.px.css'; */
Vue.use(YDUI);

//外部依赖库
import WeuiDistpicker from 'weui-distpicker';
Vue.component('weui-distpicker', WeuiDistpicker);
//WeChatAuth微信网页授权模块
import wechatAuth from './wechatAuth';
Vue.use(wechatAuth,{
    appid:'wx0bd276a3364f45f6',
});
//wechatOperation微信摄像头、语音模块
import wechatOperation from './wechatOpeartion';
Vue.use(wechatOperation);

// use YDUI
// import { Icons } from 'vue-ydui/dist/lib.rem/icons'
// import { CellGroup, CellItem } from 'vue-ydui/dist/lib.rem/cell'
// import {TabBar, TabBarItem} from 'vue-ydui/dist/lib.rem/tabbar'
// import WeuiDistpicker from 'weui-distpicker'
// import {SendCode} from 'vue-ydui/dist/lib.rem/sendcode';
// import { Confirm, Alert, Toast, Notify, Loading } from 'vue-ydui/dist/lib.rem/dialog';
// Vue.component(CellGroup.name, CellGroup);
// Vue.component(CellItem.name, CellItem);
// Vue.component(Icons.name, Icons);
// Vue.component(TabBar.name, TabBar);
// Vue.component(TabBarItem.name, TabBarItem);
// Vue.component('weui-distpicker', WeuiDistpicker);
// Vue.component(SendCode.name, SendCode);
// Vue.prototype.$dialog = {
//     confirm: Confirm,
//     alert: Alert,
//     toast: Toast,
//     notify: Notify,
//     loading: Loading,
// };
const FastClick = require('fastclick');
document.addEventListener('DOMContentLoaded', function() {
    FastClick.attach(document.body)
}, false)

if (typeof localStorage === 'undefined' || localStorage === null) {
    var LocalStorage = require('node-localstorage').LocalStorage
    localStorage = new LocalStorage('./scratch')
}

require('@/mock/mock.js')

Vue.config.productionTip = false;


new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')

